#ifndef __FIFO_H_
#define __FIFO_H_
#define FIFONAME_SIZE 10
typedef enum OpenMode
{
    ReadOnly=1,
    WriteOnly
}OpenMode;
typedef struct FIFO
{
    char Name[FIFONAME_SIZE];
    int fd;
    OpenMode mode;
}FIFO;
FIFO *InitFIFO(const char *name);
int OpenFIFO(FIFO *f,OpenMode mode);
int ReadFromFIFO(FIFO *f,void *ptr,unsigned long size);
int WriteToFIFO(FIFO *f,void *ptr,unsigned long size);
void FreeFIFO(FIFO *f);
#endif